// 仅执行一次(type)
export default (ujt: any, type: string = 'web') => {
    const { $global, $fn } = ujt;
    if (!$fn.ws[type]) {
        $fn.ws[type] = new $fn.AsaiWs({
            wsurl: $fn.As.getUrlByCfg($global.link.ws[type], 1),
            Userinfo: $global.user.info,
            wsname: type,
            wsworker: $global.link.ws[type]?.worker,
            wssec: $global.link.ws[type]?.sec,
            ujt,
        });
    }
    return $fn.ws[type];
};
